<?php
/* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Enter description here ...
 * 
 * @author Mark Phillip Johnson
 * @version 1.0
 * @copyright Copyright (c) 2010, markjohnson
 * @license http://www.gnu.org/licenses/gpl.html The GNU General Public License v3.0
 *
 */
class Storage extends Object
{
	/**
	 * @var unknown_type Enter description here ...
	 */
	private static $instance = NULL;
	
	/**
	 * @var unknown_type Enter description here ...
	 */
	var $conf = NULL;

	/**
	 * 
	 */
	public function __construct()
	{
		self::$instance = & $this;
	}

	public static function &getInstance()
	{
		if (!isset(self::$instance))
		{
			new Storage();
		}
		
		return self::$instance;
	}

	/**
	 * cache_set()
	 *
	 * @param string $cid
	 * @param mixed $data
	 * @param string $table
	 * @param define $expire
	 * @param string $header
	 */
	public static function cacheSet($cid, $data, $table = 'cache', $expire = CACHE_PERMANENT, $header = NULL)
	{
		return;
	}

	/**
	 * cache_get()
	 *
	 * TODO: finish this function
	 *
	 * @param string $cid
	 * @param string $table
	 */
	public static function cacheGet($cid, $table = 'cache')
	{
		return FALSE;
	}

	/**
	 *
	 * @param mixed $conf
	 */
	public static function init($conf = array())
	{
		return;
	}

	/**
	 *
	 * @param string $name
	 * @param mixed $default
	 * @return mixed
	 */
	public static function get($name, $default)
	{
		return $default;
	}

	/**
	 *
	 * @param string $name
	 * @param mixed $value
	 */
	public static function set($name, $value)
	{
		return;
	}

	public static function delete($name)
	{
		return;
	}
}
